const state = {
  classesGuo: [
	  {
		id: 11,
		className: '老虎',
		src: '/static/home/tiaotiaohu.jpeg',
		classTol: 11,
		tag: ['动物','卡通','老虎'],
		type: '卡通',
		price: '70.00',
		freight: '顺丰包邮',
		brief: '该课程以卡通方式对老虎进行介绍，老虎是猫科豹属虎亚属动物，它的毛色浅黄或棕黄色，满身黑色横纹，接下来更多的关于小老虎的故事来了解它吧！',
		juji: [
			{
				id: '第一集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第二集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第三集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第四集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第五集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第六集',
				jujiName: '老虎',
				imgSrc: '/static/home/tiaotiaohu.jpeg'
			},
			{
				id: '第七集',
				jujiName: '老虎',
				imgSrc: '/static/home/PeppaPig.jpeg'
			}
		]
	  },
	  {
	  	id: 21,
	  	className: '孔雀',
	  	src: '/static/home/bluejingling.jpeg',
	  	classTol: 12,			  
		tag: ['动物','卡通','孔雀'],
		type: '卡通',
		price: '30.00',
		freight: '顺丰包邮',
		brief: '该课程以卡通方式来介绍孔雀（英文名称：Peafowls、maurya）；孔雀--头顶翠绿，尾上覆羽特别长，形成尾屏，鲜艳美丽，栖息于森林的开阔地带；接下来通过视频来了解孔雀吧！',
		juji: [
			{
				id: '第一集',
				jujiName: '孔雀',
				imgSrc: '/static/home/bluejingling.jpeg'
			}
		]
	  },
	  {
	  	id: 31,
	  	className: '熊猫',
	  	src: '/static/home/xiongchumo.jpeg',
	  	classTol: 6,
		tag: ['动物','卡通','熊猫'],
		type: '卡通',
		price: '90.00',
		freight: '顺丰包邮',
		brief: '熊猫熊科大熊猫属哺乳动物，为我国国宝，想更了解熊猫小宝贝吗？那就开启课程吧！',
		juji: [
			{
				id: '第一集',
				jujiName: '熊猫',
				imgSrc: '/static/home/xiongchumo.jpeg'
			}
		]
	  }
  ],
  classesYing:[
	  {
	  	id: 21,
	  	className: '吃饭',
	  	src: '/static/image/rotation1.jpg',
	  	classTol: 5,
		tag: ['吃饭','卡通','好习惯'],
		type: '卡通',
		price: '50.00',
		freight: '顺丰包邮',
		brief: '一日三餐，注意事项颇多，良好的饮食方式与习惯可让宝宝身体更健康',
		juji: [
			{
				id: '第一集',
				jujiName: '吃饭',
				imgSrc: '/static/image/rotation1.jpg'
			}
		]
	  },
	  {
	  	id: 22,
	  	className: '睡觉',
	  	src: '/static/home/guiturun.jpeg',
	  	classTol: 7,
		tag: ['睡觉','卡通','好习惯'],
		type: '卡通',
		price: '90.00',
		freight: '顺丰包邮',
		brief: '小朋友睡眠质量不佳？不了解睡姿？及睡前注意方式？可以来看看哦！',
		juji: [
			{
				id: '第一集',
				jujiName: '睡觉',
				imgSrc: '/static/home/guiturun.jpeg'
			}
		]
	  }
  ],
  code:'',
  token:'',
  tag:[],
  allSelData:[]
}

const getters = {

}

const actions = {
	getCode(ctx,data){
		ctx.commit('getCode',data)
	},
	getToken(ctx,data){
		ctx.commit('getToken',data)
	},
	getCureentData(ctx,data){
		ctx.commit('getCureentData',data)
	},
	getTag(ctx,data){
		ctx.commit('getTag',data)
	}
}

const mutations = {
	getCode(state,data){
		state.code = data		
	},
	getToken(state,data){
		state.token = data;
		uni.setStorageSync('token',JSON.stringify(data))
	},
	getCureentData(state,data){
		state.allSelData = data;
	},
	getTag(state,data){
		state.tag = data;
	}
}

export default {
    namespace:true,
    state,
    mutations,
    actions,
    getters
}